package org.intelligentsia.keystone.sample;

import java.io.File;
import java.util.Map;

import org.intelligentsia.keystone.boot.Command;
import org.intelligentsia.keystone.boot.Console;
import org.intelligentsia.keystone.updater.Update;

/**
 * 
 * @author jguibert
 */
public class Echo {

	public static void main(final String[] args) throws Exception {
		Console.setLogFile(new File("./echo.log"));
		final Map<String, String> arguments = Command.loadArguments(args);
		Console.INFO("Coucou, Welcome on Sample project " + arguments);
		if (Command.getBooleanArgument(arguments, "update", false)) {
			Update.main(args);
		} else {
			Console.INFO("Waiting 5 secondes before stop");
			Thread.sleep(5000);
		}
	}
}
